package com.example.beidouapplication;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import androidx.annotation.Nullable;

import com.example.beidouapplication.viewmodel.Key;
import com.example.beidouapplication.viewmodel.KeyEvent;


public class FragmentQidong extends Fragment {

    Button btn_zcqd;
    Button btn_ksqd;

    static FragmentQidong instance = new FragmentQidong();

    @Override
    public View onCreateView(
            LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState
    ) {

        View inflate = inflater.inflate(R.layout.fragment_qidong, container, false);
        return inflate;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        btn_zcqd = (Button) getActivity().findViewById(R.id.btn_qidong_zcqd);

        btn_zcqd.setOnClickListener(v -> Menu.keyQueue.add(new KeyEvent(Key.ENTER, 1)));


        btn_ksqd = (Button) getActivity().findViewById(R.id.btn_qidong_ksqd);

        btn_ksqd.setOnClickListener(v -> Menu.keyQueue.add(new KeyEvent(Key.ENTER, 2)));

    }


}